<template>
    <div class="musicBox" >
        <h1>歌曲界面{{item.title}}</h1>

        	<ul class="mui-table-view mui-table-view-chevron" >
		<li class="mui-table-view-cell mui-media" v-for="item in mlist" :key="item.id">
					<router-link to="/newinfo" class="mui-navigate-right" href="javascript:;">
					<img class="mui-media-object mui-pull-left" :src="item.image">
						<div class="mui-media-body">
						   {{item.context}} 
							<p class='mui-ellipsis' >{{item.title}}</p>
							<!-- <p class='mui-ellipsis' >{烤炉模式的城，到黄昏，如同打翻的调色盘一般}</p> -->
                            <span id="time">{{time | formatTime}}</span>
                            <span id="good">点赞次数:0</span>
						</div>
					</router-link>
				</li>
                <li class="mui-table-view-cell mui-media">
					<a class='mui-navigate-right' @click="getnewlist1()" href="javascript:;">
						<img class="mui-media-object mui-pull-left" src="../images/6.jpg">
						<div class="mui-media-body">
							远眺
							<p class='mui-ellipsis'  >静静的看这个世界，最后终于疯了</p>
						</div>
					</a>
				</li>
				<li class="mui-table-view-cell mui-media">
					<a class="mui-navigate-right"  href="javascript:;">
						<img class="mui-media-object mui-pull-left" src="../images/7.jpg">
						<div class="mui-media-body">
							幸福
							<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
						</div>
					</a>
				</li>
        	</ul>

    </div>
</template>

<script>
import {Toast} from 'mint-ui'
 
export default {
            data(){
                return{
                    mlist:[],
                    title:'',
                    id:'' ,
                    context:'',




                }
            },
            components:{

            },
            created(){
                    this.get()
            },
            methods:{
                get(){

                    $(function(){
                          
                                    $.ajax({
                                          //url:'http://api.avatardata.cn/Music/Search?key=9fe6251a3b3a4e9b9ef22e63af649a3e&keyword=故乡的云',
                                          url:'http://www.yjw.com/web/VUE/1234.json',
                                          type:'GET', 
                                          data: '',
                                          dataType: 'json',
                                           success: result =>{ 
                                               this.mlist=result 
                                            //    console.log(result)
                                            //    alert(result.title)
                                           }

                                    })
                                    // .then(
                                        
                                    //             function(data){
                                    //                 if(error_code===0){
                                    //                 //console.log(data.total)
                                    //                 //alert(data.total)
                                    //                     this.mlist=data
                                    //                 }
                                                 
                                    //       }
                                         
                                         
                                    // )


        // $.ajax({ 
        //     type: "GET", 	
		// 	url: "http://www.yjw.com/WEBPACK1/%E9%A1%B9%E7%9B%AE/%E5%90%8E%E5%8F%B0/get1.json",
		// 	dataType: "jsonp",
		// 	jsonp: "callback",
		// 	success: function(data) {
        //             this.mlist=data
		// 	},
		// 	error: function(jqXHR){     
		// 	   alert("发生错误：" + jqXHR.status);  
		// 	},     
        // });
        

                        
                        });

                },
                 getnewlist1(){
                         Toast("获取失败!")
                 }
                
            }
            
      }
</script>

<style  >

.musicBox{
     padding-top: 40px;
	padding-bottom: 50px;
}


</style>
